package controller

import (
	"fileshare/controller/server"
	"fileshare/controller/tools"
	"github.com/gin-gonic/gin"
	"net/http"
)

/**
* @program: fileshare
*
* @description:
*
* @author: Koco.Allien
*
* @create: 2020-04-05 17:49
**/
func IndexController(c *gin.Context) {
	data, _, _ := tools.StartDate(c, "主页", 1)

	data["files"] = server.GetPublicFiles()

	c.HTML(http.StatusOK, "index.html", data)
}
